cmake_minimum_required(VERSION 3.16)

project(Game LANGUAGES CXX)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt6  REQUIRED COMPONENTS Widgets )
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets )

add_executable(Game
  main.cpp
  resources.qrc
  Animation.h Animation.cpp
  Bullet.h Bullet.cpp
  Enemy.h Enemy.cpp
  Entity.h
  Game.h Game.cpp
  Global.h
  Manager.h
  Map.h Map.cpp
  PlayerPlane.h PlayerPlane.cpp
  sprite.h sprite.cpp
  mypushbutton.h mypushbutton.cpp
  score.h score.cpp
)
target_link_libraries(Game Qt${QT_VERSION_MAJOR}::Widgets )

include(GNUInstallDirs)
install(TARGETS Game
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
